package api

import (
	"gitee.com/huanfion/urlshortener/internal/common"
	"gitee.com/huanfion/urlshortener/internal/models/dto"
	"github.com/gin-gonic/gin"
	"net/http"
)

func CreateUrl(c *gin.Context) {
	// 数据提取 并校验数据
	var createrUrlReq dto.CreateUrlRequest
	if err := c.ShouldBindJSON(&createrUrlReq); err != nil {
		common.ErrorResponse(c, http.StatusInternalServerError, err.Error())
		return
	}

	common.SuccessResponse(c, gin.H{})
}

func RedirectURL(c *gin.Context) {
	common.SuccessResponse(c, gin.H{})
}
